<div class="layui-fluid layui-anim website-anim-up" id="website-user-message" lay-title="用户消息">
    <div class="layui-row layui-col-space8 website-container">
        <div class="layui-col-md12 layui-col-sm12 layui-col-xs12">
            <table lay-filter="userMessagesTable"
                   lay-data="{id: 'userMessagesTable'}"></table>
        </div>
    </div>
</div>

<script data-th-inline="none" type="text/javascript">
    layui.use(['jquery', 'laydate', 'table', 'website'], function () {
        let $ = layui.jquery,
            laydate = layui.laydate,
            website = layui.website,
            table = layui.table,
            $view = $('#website-user-message'),
            tableIns;

        // 渲染表格
        initUserMessagesTable();

        function initUserMessagesTable() {
            tableIns = website.table.init({
                elem: $view.find('table'),
                url: ctx + 'message/client/list',
                id: 'userMessagesTable',
                cols: [
                    [
                        {field: 'content', title: '消息内容', minWidth: 400},
                        {field: 'sendTime', title: '发送时间', minWidth: 100, maxWidth: 150},
                        {field: 'publishObjectUnitName', title: '发送单位', minWidth: 150}
                    ]
                ]
            });
        }


    })

</script>